Dynomotion

Group: DynoMotion Message: 8662 From: Hugh Sontag Date: 11/16/2013
Subject: Invalid External Command Received
Hi Tom,

I have a C program that runs on KFLOP and moves the X and Y axis to a specific location.

Sometimes, when I execute this command, I get an error message in KMotionCNC:

Invalid External Command Received

I've attached an image of the error message.

Prior to the message, KMotionCNC seems to be happy. After I get that message, I've noticed odd behaviors in KMotionCNC. Although it's not consistent, I believe I've seen it move the wrong axis when I press one of the arrow buttons, and releasing the button doesn't always cause the motion to stop.

I've resorted to exiting KMotionCNC and re-opening it when this happens, to avoid further problems from its apparent confusion.

Do you have any suggestions on what might be happening, and any suggestions on how I can avoid the problem?

Thanks,
Hugh

  @@attachment@@
Group: DynoMotion Message: 8664 From: Tom Kerekes Date: 11/16/2013
Subject: Re: Invalid External Command Received [1 Attachment]
Hi Hugh,

KMotionCNC monitors persist.UserData variable 100 for External Commands.

That error message indicates that KMotionCNC detected an unrecognized command code in that location.

Could you be using that for some conflicting purpose?

Regards
TK

Group: DynoMotion Message: 8675 From: Hugh Sontag Date: 11/17/2013
Subject: Re: Invalid External Command Received
Yes, I used persist.UserData[99] through persist.UserData[107] for persistent storage for parameters for some of my C programs. 

What areas of persist.UserData[] are not generally used, and that I could use without conflict?

Thanks,
Hugh



On Sat, Nov 16, 2013 at 5:21 PM, Tom Kerekes <tk@...> wrote:
 

Hi Hugh,

KMotionCNC monitors persist.UserData variable 100 for External Commands.

That error message indicates that KMotionCNC detected an unrecognized command code in that location.

Could you be using that for some conflicting purpose?

Regards
TK

Group: DynoMotion Message: 8677 From: Tom Kerekes Date: 11/17/2013
Subject: Re: Invalid External Command Received
Hi Hugh,

Sorry we don't have a good mechanism for avoiding conflicts.  So far there are only 8 used (100-107) as defined int PC_DSP.h as:

#define PC_COMM_PERSIST 100  // First Persist Variable that is uploaded in status
#define N_PC_COMM_PERSIST 8  // Number of Persist Variables that are uploaded in status

These 8 locations are always uploaded to the PC with the KFLOP Bulk status read which can be useful for any PC application.  KMotionCNC uses this mechanism to receive external commands from KFLOP.   Actually if a command is never placed in Variable 100 then KMotionCNC will never look at the other 7.

Other variables might be used by your MCode Configurations, user Buttons, or other C Programs.

Regards
TK